<?php
// include ("../../chart/functions.php");
$code_res="";
if(isset($_GET['code_res'])){
	$code_res=$_GET['code_res'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
<head>
<script>
function OuvrirPopup(page) {
      window.open(page, "comments", "toolbar=yes, status=yes, scrollbars=yes, resizable=yes, width=1100, height=800");
}
</script>
<link type="text/css" href="../../../../global-themis/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" />	
<script type="text/javascript" src="../../../../global-themis/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../../../../global-themis/js/jquery-ui-1.8.16.custom.min.js"></script>	
<script src="../../../../global-themis/js/jquery.tablescroll.js"></script>
<link rel='stylesheet' type='text/css' href='../../../../global-themis/css/themisstyle.css'/>		
<script type="text/javascript">
$(document).ready(function(){
// si on change le select, on charge le graphe...
	$("#datepicker").change(function(){
		var selec_date = $("#datepicker").val();
		var code_res = '<?php echo $code_res; ?>';
		var dataString = 'selec_date='+selec_date+'&code_res='+code_res;
		$.ajax	({
			type: "POST",
			url: "./php-ajax/get_chart.php",
			data: dataString,
			cache: false,
			success: function(html){
				$("#container").html(html);
			}
		});
	});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
// par default, le compte qui commence par 251100EUR...
		var selec_date = $("#datepicker").val();
		var code_res = '<?php echo $code_res; ?>';
		var dataString = 'selec_date='+selec_date+'&code_res='+code_res;
		$.ajax	({
			type: "POST",
			url: "./php-ajax/get_chart.php",
			data: dataString,
			cache: false,
			success: function(html){
				$("#container").html(html);
			}
		});
});
</script>
	<script>
	$(function() {
		$( "#datepicker" ).datepicker();
	});
	</script>

</head>
<body>
<input id='datepicker'  type="text" readonly title="Choisir la date.."  value='<?php echo date('Y-m-d');?>' />
<div id='container'></div>
</body>
</html>